package com.ugoodtech.mdcc.core.repository;

import com.ugoodtech.mdcc.core.domain.StationCustomerReport;
import com.ugoodtech.mdcc.core.domain.StationRegularServiceReportUnFinshed;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface StationRegularServiceReportUnFinshedRepository extends PagingAndSortingRepository<StationRegularServiceReportUnFinshed, Long>
        , QueryDslPredicateExecutor<StationRegularServiceReportUnFinshed> {

    @Query("from StationRegularServiceReportUnFinshed where answer_id=:answer_id and report_id=:report_id")
    Object isNull(@Param("answer_id") Long answer_id, @Param("report_id") Long report_id);


    @Query("from StationRegularServiceReportUnFinshed where report_id=:report_id")
    List<StationRegularServiceReportUnFinshed> selectAnswer(@Param("report_id") Long report_id);

}
